// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import {
	$http
} from '@escook/request-miniprogram'

uni.$http = $http
Vue.config.productionTip = false
$http.baseUrl = "https://api-hmugo-web.itheima.net/api/public/v1"
App.mpType = 'app'

$http.beforeRequest = function(options) {
	uni.showLoading({
		title: "数据加载中"
	})
}
$http.afterRequest = function() {
	uni.hideLoading()
}
const app = new Vue({
	...App
})

uni.$showMsg = function(title = "恭喜你，请求失败", duration = 1500, icon = "none") {
		return uni.showToast({
			title,
			duration,
			icon
		})
		this.swiperList = res.message
	},
	app.$mount()
// #endif

// #ifdef VUE3
import {
	createSSRApp
} from 'vue'
import App from './App.vue'
export function createApp() {
	const app = createSSRApp(App)
	return {
		app
	}
}
// #endif